var myChart0 = echarts.init(document.getElementById('drawing-left'));
var	option0 = {
    title : {

    },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
        show:true,
        orient : 'vertical',
        x : 'right',
        data:['务农人数','转移就业人数','创业人数']
    },
    toolbox: {
        show : false,
        feature : {
            mark : {show: true},
            dataView : {show: true, readOnly: false},
            magicType : {
                show: true,
                type: ['pie', 'funnel'],
                option: {
                    funnel: {
                        x: '25%',
                        width: '50%',
                        funnelAlign: 'left',
                        max: 1548
                    }
                }
            },
            restore : {show: true},
            saveAsImage : {show: true}
        }
    },
    calculable : true,
    series : [
        {
            name:'',
            type:'pie',
            radius : '55%',
            center: ['50%', '60%'],
            itemStyle: {
                normal: {
                    color: function(params) {
                        // build a color map as your need.
                        var colorList = [
                            '#45bfee','#c6559b','#e8e500'
                        ];
                        return colorList[params.dataIndex]
                    }
                }
            },
            data:[
                {value:335, name:'务农人数'},
                {value:310, name:'转移就业人数'},
                {value:234, name:'创业人数'},
            ]
        }
    ]
};


myChart0.setOption(option0);

var myChart1 = echarts.init(document.getElementById('drawing-right'));
var option1 = {
    title : {

    },
    tooltip : {
        trigger: 'axis'
    },
    grid:{
        right:'0%',

    },
    legend: {

        data:['转移就业行业','创业行业'],
        x:'right'


    },
    toolbox: {
        show : false,
        feature : {
            mark : {show: true},
            dataView : {show: true, readOnly: false},
            magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
            restore : {show: true},
            saveAsImage : {show: true}
        }
    },
    calculable : true,
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
            data : ['农林牧渔业','采掘业','采制造电业','建筑业','信息传输业','批发零售业',
                '住宿和餐营业','金融业','房地产业','租赁商务业','科学研究业','水利公共设施业',
                '居民服务业','教育业','卫生社会保障业','文化娱乐业','公共管理业','国际组织业','其他']
        }
    ],
    yAxis : [
        {
            type : 'value',
            splitLine:{show:false}

        }
    ],
    series : [
        {

            type:'line',
            smooth:true,		//曲线是否光滑
            name:'转移就业行业',
            itemStyle: {normal: {areaStyle: {type: 'default'}}},	//圆柱体的areStyle形式
            data:[140, 192, 950, 201, 200, 650, 320,220,850
                ,355,140,520,160,780,492,245,275,150,260,330]
        },
        {

            type:'line',
            name:'创业行业',
            smooth:true,
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
            data:[130, 182, 134, 191, 190, 230, 310,210,243
                ,345,130,142,150,164,482,235,265,140,250,320]
        },

    ],


};

myChart1.setOption(option1);

$(window).resize(function () {
    var w = $(window).width();
    //适配顶部header部分
    $(".header .header-middle").css("width",(956/1920)*w+"px");

    //适配body部分
    $(".body .body-top").css("width",(335/1920)*w+"px");
    $(".body .body-down .body-down-left").css("width",(200/1920)*w+"px");
    $(".body .body-down .body-down-right").css("width",(1535/1920)*w+"px");

    $(".body .body-down .body-down-right .body-down-right-down").css("width",(1449/1920)*w+"px");

});
$(document).ready(function () {
    var w = $(window).width();
    //适配顶部header部分
    $(".header .header-middle").css("width",(956/1920)*w+"px");
    //适配body部分
    $(".body .body-top").css("width",(335/1920)*w+"px");
    $(".body .body-down .body-down-left").css("width",(200/1920)*w+"px");
    $(".body .body-down .body-down-right").css("width",(1535/1920)*w+"px");
    $(".body .body-down .body-down-right .body-down-right-down").css("width",(1449/1920)*w+"px");

});